<?php

    $content=short_check(get_args("content"));
    $time=time();
    $id=get_sess_userid();
    $name=get_sess_username();
    $ico=get_sess_userico();
    $year=short_check(get_args("year"));
    $month=short_check(get_args("month"));
    $day=short_check(get_args("day"));
    $deadline=strtotime($year.'-'.$month.'-'.$day);
    //$deadline=$year.'-'.$month.'-'.$day;
    $city=short_check(get_args("city"));
    $age=short_check(get_args("age"));

    $dbo = new dbex;
    //读写分离定义函数
    dbtarget('w',$dbServs);
    $sql ="insert into iweber_night";
    $sql.="(iweber_night_detail,iweber_night_time,iweber_user_id,iweber_user_name,iweber_user_ico,iweber_night_city,iweber_night_age,iweber_night_deadline)";
    $sql.=" values ('".$content."',$time,$id,'$name','$ico','$city',$age,$deadline)";
    if($dbo->exeUpdate($sql)){
    action_return(1,"幸福之夜信息添加成功！",'');
}
//回应信息
    action_return(0,"幸福之夜信息添加失败！",'');

?>
